package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.DivineDataService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/divineData/")
public class DivineDataController {

  @Autowired
  DivineDataService divineDataService;

  /**
   * D2接收输出参数(公共)
   */
    @PostMapping("queryOutputParametersDetailCom")
    public OkrResult<QueryOutputParametersDetailComRespDto> queryOutputParametersDetailCom(@RequestBody @Validated QueryOutputParametersDetailComReqDto reqDTO){
    return OkrResult.success(divineDataService.queryOutputParametersDetailCom(reqDTO));
    }
/**
   * D2获取上一周期类型服务(公共)
   */
    @PostMapping("obtainLastCycleTypeCom")
    public OkrResult<ObtainLastCycleTypeComRespDto> obtainLastCycleTypeCom(@RequestBody @Validated ObtainLastCycleTypeComReqDto reqDTO){
    return OkrResult.success(divineDataService.obtainLastCycleTypeCom(reqDTO));
    }
/**
   * D2检查时间范围查询(公共)
   */
    @PostMapping("checkTimeScopeSearchCom")
    public OkrResult<CheckTimeScopeSearchComRespDto> checkTimeScopeSearchCom(@RequestBody @Validated CheckTimeScopeSearchComReqDto reqDTO){
    return OkrResult.success(divineDataService.checkTimeScopeSearchCom(reqDTO));
    }
/**
   * D2执行分析数据集完成情况(公共)
   */
    @PostMapping("implementAnalyzeDataSetCompletionCom")
    public OkrResult<ImplementAnalyzeDataSetCompletionComRespDto> implementAnalyzeDataSetCompletionCom(@RequestBody @Validated ImplementAnalyzeDataSetCompletionComReqDto reqDTO){
    return OkrResult.success(divineDataService.implementAnalyzeDataSetCompletionCom(reqDTO));
    }
/**
   * D2执行取数据集最大值加一(公共)
   */
    @PostMapping("implementMaxOfCollectionsAddOneCom")
    public OkrResult<ImplementMaxOfCollectionsAddOneComRespDto> implementMaxOfCollectionsAddOneCom(@RequestBody @Validated ImplementMaxOfCollectionsAddOneComReqDto reqDTO){
    return OkrResult.success(divineDataService.implementMaxOfCollectionsAddOneCom(reqDTO));
    }
}
